s = "100"
print(s, type(s))
print(s + "1")

# 类型转换
i = int(s)
print(i, type(i))
print(i + 1)

# 类型转换成异常
# s = "100a"
# i = int(s)
# print(i)



# 将int转换成字符串
s2 = str(i)
print(s2, type(s2))

s3 = "3.14159"
# 转换成浮点数
f = float(s3)
print(f, type(f))

# 布尔值转换
print(bool(1))  # True
print(bool(0))  # True
print(bool("asda"))  # True
print(bool(""))  # True
print(bool("0"))  # True
# None: 空
print(bool(None))  # False
